<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.js"></script>
    <style>
        [v-cloak]{
            display: none;
        }
    </style>
</head>

<body>
    <div id="app">
        <p v-text="msg"></p>
        <p v-html="content"></p>

        <!-- 只执行一次 -->
        <p v-once>{{username}}</p>
        <input  type="text" v-model="username"></input><br>
        <!-- 不进行编译 -->
        <input v-pre type="text" v-model="username"></input>

        <!-- [v-clock]选择当前元素,设置为隐藏,v-clock在vue介入之后自动失效 -->
        <p v-cloak>{{name}}</p>
    </div>
    <script>
        Vue.config.productionTip = false;
        
        const vm = new Vue({
            el: "#app",
            data() {
                return {
                    msg:'hello',
                    content:'<h1>标题</h1>',
                    username:"zhangsan",
                    name:"hahaha"
                }
            }
        })
</script>
</body>

</html>